package com.sinog.front.service.user;

import com.sinog.core.utilbean.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc 获取登录用户的departid
 * @author -
 * @date -
 */
@RestController
public class UserInfoController {

    @Autowired
    private UserFacade userFacade;

    /**
     * 获取登录用户的departid
     * @return Result
     */
    @GetMapping("/user/getuser/getLoginUserDepartId")
    public Result getLoginUserDepartId() {
        return Result.success(userFacade.getAuthentication().getDepartid());
    }
}